const getters = {
  sidebar: (state) => state.app.sidebar,
  device: (state) => state.app.device,
  token: (state) => state.user.token,
  loginId: (state) => state.user.loginId,
  username: (state) => state.user.name,
  description: (state) => state.user.description,
  addRoutes: (state) => state.permission.addRoutes,
  sidebarRouters: (state) => {
    return state.permission.sidebarRouters !== 0
      ? state.permission.sidebarRouters
      : state.permission.defaultRoutes;
  },
  avatar: (state) =>
    state.user.avatar ||
    'http://pic.imeitou.com/uploads/allimg/230113/7-230113130009.jpg',
  name: (state) => state.user.name,
};
export default getters;
